package com.bridge;

import com.bridge.memory.Memory6G;
import com.bridge.memory.Memory8G;
import com.bridge.phone.HuaweiPhone;
import com.bridge.phone.Phone;
import com.bridge.phone.XiaomiPhone;

/**
 * bridge pattern
 */
public class Run {
    public static void main(String[] args) {
        Phone huawei = new HuaweiPhone();
        Phone xiaomi = new XiaomiPhone();
        huawei.setPhoneMemory(new Memory6G());
        xiaomi.setPhoneMemory(new Memory8G());
        huawei.buyPhone();
        xiaomi.buyPhone();
    }
}
